/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.web.entity.WxAgents;

/**
 * 代理商MAPPER接口
 * 
 * @author rongjie
 * @version 2017-08-06
 */
@MyBatisMapper
public interface WxAgentsMapper extends BaseMapper<WxAgents> {
	@Select("select count(1) from wx_agents where username=#{tel} ")
	int getCountTel(String tel);

	WxAgents getAgents(@Param("tel") String tel, @Param("password") String password);

	void setAgents(@Param("tel") String tel, @Param("password") String password, @Param("address") String address);

	List<WxAgents> findListMore(WxAgents wxAgents);

	List<WxAgents> selectList(WxAgents wxAgents);

	WxAgents getByUsername(@Param("username") String username);

	List<WxAgents> getByUsernameWithoutSelf(@Param("username") String username, @Param("id") String id);

	List<WxAgents> getByLevel(@Param("level") int level, @Param("status") String status);

	List<WxAgents> getByParentsLevel(@Param("level") int level, @Param("status") String status);

	WxAgents getAgentsByEquipment(@Param("equipment") String equipmentId);

    void updateKtxMoney(@Param("money") Double money, @Param("id") String id);
	void updateMoney(@Param("money") Double money, @Param("id") String id);

}